package com.hellowx.qydcdev.service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.hellowx.qydcdev.entity.Business;
import com.hellowx.qydcdev.entity.BusinessVO;

/**
 * Created on 2022/1/5.
 *
 * @author Hello WX
 */
public interface BusinessService {
    /**
     * 分页查找店铺
     * @param page 分页对象
     * @return list
     */
    PageInfo<BusinessVO> selectListByPage(Page<Business> page);

    /**
     * 加载供应商信息及其商品信息
     * @param businessId 店铺id
     * @return 店铺对象
     */
    BusinessVO getBusinessIncludeGoodsById(Long businessId);

    /**
     * 查询店铺列表
     * @param businessName 店铺名称
     * @param pageNum 页码
     * @param pageSize 页面大小
     * @return list
     */
    PageInfo<Business> listBusinessByNameAndPage(String businessName, int pageNum, int pageSize);

    /**
     * 查询店铺,包含用户信息
     * @param businessId 店铺信息
     * @return object
     */
    BusinessVO getByIdIncludeUser(Long businessId);

    /**
     * 保存店铺信息(包含修改)
     * @param business 店铺信息
     * @return msg
     */
    String saveBusiness(Business business);
}
